const {DataTypes } = require('sequelize');
const sequelize = require('../db/sequelize')

const Article = sequelize.define('article', {
  
  slug: {   //别名
    type: DataTypes.STRING,  //类型
    allowNull: false,  //必填
    primaryKey:true  //关键
  },
  title: {   //标题
    type: DataTypes.STRING,
    allowNull: false,
  },
  description: {   //描述
    type: DataTypes.TEXT,
  },
  body: {   //内容
    type: DataTypes.TEXT,
    allowNull: false,
  }
});


module.exports = Article